
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<%@ page contentType="text/html; charset=utf-8"%>
	<%@ include file="/commons/taglibs.jsp"%>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
		<title>信息终端新增</title>
		<%@ include file="/commons/css_js_head.jsp"%>

<script language="JavaScript">
doSaveUrl = "${ctx }/plat/platMconfAction!doSave.ts";
		function closeWidows()
		{
			self.parent.tb_remove();
		}
		
		function checkForm(){
		   var _form = document.forms[0];
			if (doSaveUrl == '') {
				alert('请设置正确的URL!');
				return false;
			}
			_form.action = doSaveUrl;
		   return true;
		}
		
		function doSave() {
			if(checkForm()) {
			    
				$("#div_bar").css('display','block'); 
				$("#check_submit").attr("disabled", true);
				$("#close_button").attr("disabled", true); 
				$("#form1").ajaxSubmit({
				async: false,
				type: "POST",
				dataType:"json",
				cache: false,
				success: function(date){
				    var results = date.result;
				    var s =results.split(":");
				    var result = s[0];
					if(result=="0")
					{
						alert("保存成功");
						window.close();
						parent.window.location.reload();
						//parent.window.document.forms[0].submit();
					}
					else{
					    alert("保存失败");
						window.close();
						parent.window.location.reload();
						//parent.window.document.forms[0].submit();
					}
					
				}
			});
			}
			else
				alert("请选择以xls结尾的Excel文件");
		}
		
</script>
	</head>

	<body style="overflow-x: hidden">
		<div class="mTitle">
			<span class="hidsearch"></span>
			<b class="bbig">信息终端修改</b> 带
			<b class="fred"> * </b>号为必填项
		</div>

		
		
		<s:form id="form1" action="/plat/platMconfAction" method="POST" >
		
		<input type="hidden" name="platMconf.mcInfoId" value="${mcInfoId }" />
            <!--list -->
			<div class="mainAdd">
				<table class="addTable">
					<tr>
						<td colspan="4">
							<b class="fblue">数据交换中心基本信息</b>
						</td>
					</tr>
					<tr>
						<th>
							<b class="fred"> * </b> 是否生效：
						</th>
						<td colspan="3">
						    <s:select list="#{0:'启用',1:'关闭'}"  
							theme="simple"
							name="platMconf.status"
							listKey="key" 
							cssStyle="width:50px;"	
							listValue="value"  
							headerKey="0" 
							/> 
						</td>
						
					</tr>
					<tr>
						<td colspan="4">
							<b class="fblue">读头设置</b>
						</td>
					</tr>
					<tr>
						<th>
							<b class="fred"> * </b> 开始时间：
						</th>
						<td >
						    <s:textfield name="platMconf.startTime" cssClass="Wdate" size="22" onfocus="WdatePicker({el:'platMconf.startTime',dateFmt:'yyyy-MM-dd HH:mm:ss'})" readonly="true" theme="simple" />
						</td>
						<th>
							<b class="fred"> * </b> 结束时间：
						</th>
						<td>
							<s:textfield name="platMconf.endTime" cssClass="Wdate" size="22" onfocus="WdatePicker({el:'platMconf.endTime',dateFmt:'yyyy-MM-dd HH:mm:ss'})" readonly="true" theme="simple" />
						</td>
					</tr>
					<tr>
						<th>
							<b class="fred"> * </b> 主读头状态：
						</th>
						<td >
						    <s:select list="#{0:'正常',1:'异常'}"  
							theme="simple"
							name="platMconf.mainHeadStatus"
							listKey="key" 
							cssStyle="width:50px;"	
							listValue="value"  
							headerKey="0" 
							/> 
						</td>
						<th>
							<b class="fred"> * </b> 从读头状态：
						</th>
						<td>
							 <s:select list="#{0:'正常',1:'异常'}"  
							theme="simple"
							name="platMconf.minorHeadStatus"
							listKey="key" 
							cssStyle="width:50px;"	
							listValue="value"  
							headerKey="0" 
							/> 
						</td>
					</tr>
					
					<tr>
						<td colspan="4">
							<b class="fblue">上卡率设置</b>
						</td>
					</tr>
					<tr>
						<th>
							上卡率百分比：
						</th>
						<td  colspan="3">
						   <s:textfield name="platMconf.effectiveRate"  theme="simple" ></s:textfield>
						</td>
						
					</tr>
					<tr>
						<th>
							<b class="fred"> * </b> 开始时间：
						</th>
						<td >
						    <s:textfield name="platMconf.ectStartTime" cssClass="Wdate" size="22" onfocus="WdatePicker({el:'platMconf.ectStartTime',dateFmt:'yyyy-MM-dd HH:mm:ss'})" readonly="true" theme="simple" />
						</td>
						<th>
							<b class="fred"> * </b> 结束时间：
						</th>
						<td>
							<s:textfield name="platMconf.ectEndTime" cssClass="Wdate" size="22" onfocus="WdatePicker({el:'platMconf.ectEndTime',dateFmt:'yyyy-MM-dd HH:mm:ss'})" readonly="true" theme="simple" />
						</td>
					</tr>
					
				</table>
			</div>               
        </s:form>
        
        <!-- button -->
		  <div class="openBtn">
		  	<button class="btn" id="check_submit" onclick="doSave();" title="点击提交" style="width:80px;"><b>保 存</b></button>
		  	&nbsp;&nbsp;&nbsp;&nbsp;
			<button class="btn" id="close_button" onclick="closeWidows();" title="关闭窗口" style="width:80px;"><b>返 回</b></button>
			<div style="display: none" id="div_bar">正在保存，请稍候......</div>
		  </div>
		  <!-- end button -->

	</body>


</html>
